package bagu.set;

import java.util.*;

public class MapDemo01 {
    public static void main(String[] args) {
        Map<Integer, Integer> hashMap = new HashMap<>();
        Map<Integer, Integer> linkedHashMap = new LinkedHashMap<>();

        for (int i = 1; i <= 100; i++) {
            hashMap.put(i, i * i);
            linkedHashMap.put(i, i * i);
        }

        hashMap.forEach((key, value) -> {
            System.out.println(key);
        });

        System.out.println("----------------");
        linkedHashMap.forEach((key, value) -> {
            System.out.println(key);
        });

    }
}
